﻿using System;
using System.Collections.Generic;
using System.Data.Linq.Mapping;
using System.Linq;
using System.Text;
using Chowpoo.Sql;

namespace CourseSystem.Core.Entities
{
    [Table(Name = "Topics")]
    public class TopicsInfo : IDetach
    {
        public TopicsInfo()
        {
            Detach();
        }
        #region Model
        private int _id;
        private int _fid = 0;
        private int _postertype = 0;
        private int _posterid = 0;
        private string _postername = "";
        private DateTime _posttime = DateTime.Now;
        private DateTime _lastposttime = Convert.ToDateTime("1900-1-1");
        private int _lastpostertype = 0;
        private int _lastposterid = 0;
        private string _lastpostername = "";
        private int _views = 0;
        private int _replies = 0;
        private int _status = 0;
        private bool _isDigest = false;
        private string _title = "";
        /// <summary>
        /// 
        /// </summary>
         [Column(IsDbGenerated = true, IsPrimaryKey = true, IsVersion = true)]
        public int Id
        {
            set { _id = value; }
            get { return _id; }
        }
        /// <summary>
        /// 
        /// </summary>
       [Column]
        public int Fid
        {
            set { _fid = value; }
            get { return _fid; }
        }

        [Column]
        public string Title
        {
            set { _title = value; }
            get { return _title; }
        }

        /// <summary>
        /// 1学生2教师/管理员
        /// </summary>
       [Column]
       public int PosterType
        {
            set { _postertype = value; }
            get { return _postertype; }
        }
        /// <summary>
        /// 
        /// </summary>
       [Column]
       public int PosterId
        {
            set { _posterid = value; }
            get { return _posterid; }
        }
        /// <summary>
        /// 
        /// </summary>
       [Column]
       public string PosterName
        {
            set { _postername = value; }
            get { return _postername; }
        }
        /// <summary>
        /// 
        /// </summary>
       [Column]
       public DateTime PostTime
        {
            set { _posttime = value; }
            get { return _posttime; }
        }
        /// <summary>
        /// 
        /// </summary>
       [Column]
       public DateTime LastPostTime
        {
            set { _lastposttime = value; }
            get { return _lastposttime; }
        }
        /// <summary>
        /// 
        /// </summary>
       [Column]
       public int LastPosterType
        {
            set { _lastpostertype = value; }
            get { return _lastpostertype; }
        }
        /// <summary>
        /// 
        /// </summary>
       [Column]
       public int LastPosterId
        {
            set { _lastposterid = value; }
            get { return _lastposterid; }
        }
        /// <summary>
        /// 
        /// </summary>
       [Column]
       public string LastPosterName
        {
            set { _lastpostername = value; }
            get { return _lastpostername; }
        }
        /// <summary>
        /// 
        /// </summary>
       [Column]
       public int Views
        {
            set { _views = value; }
            get { return _views; }
        }
        /// <summary>
        /// 
        /// </summary>
       [Column]
       public int Replies
        {
            set { _replies = value; }
            get { return _replies; }
        }
        /// <summary>
        /// 
        /// </summary>
       [Column]
       public int Status
        {
            set { _status = value; }
            get { return _status; }
        }

       [Column]
       public bool IsDigest
        {
            set { _isDigest = value; }
            get { return _isDigest; }
        }

        #endregion Model

        public void Detach()
        {

        }
    }
}
